package dice

import (
	"math/rand"
	"time"
)

type Dice struct {
	sides int
}

func New(sides int) *Dice {
	rand.Seed(time.Now().UTC().UnixNano())
	return &Dice{sides: sides}
}

func (d *Dice) Roll() int {
	return (rand.Int() % d.sides) + 1
}

